package com.tool_stdy.others;

/**
 * Created by yan_li on 2016/1/16.
 */
public class TestDiGui {
    public static void main(String[] args) {
        System.out.println(Function(9));
    }

    //阶乘
    public static int getNum(int n){
       if(n==1){
           return 1;
       }else {
           return n* getNum(n-1);
       }
    }
    //斐波那契数列
    public static  int Function(int i){
        if(i==1||i==2){
            return 1;
        }else {
            return Function(i-1)+Function(i-2);
        }
    }
}
